import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { BusiProvider } from '../../providers/busi/busi';
import { NativeProvider } from '../../providers/native/native';

/**
 * Generated class for the UserdetailPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
  selector: 'page-userdetail',
  templateUrl: 'userdetail.html',
})
export class UserdetailPage {
  userdetail:any;
  constructor(public navCtrl: NavController, public navParams: NavParams,private busi:BusiProvider,private native:NativeProvider) {
    this.userdetail = this.navParams.get("userdetail");
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad UserdetailPage');
  }
  usersh(){
    this.busi.userSh(this.userdetail.userid).subscribe(
      data=>{
        this.native.showToast("审核成功！");
        this.navCtrl.pop();
      },err=>{

      }
    );
  }

}
